package com.ysy.logistics.entities.stock.dto;

import com.ysy.logistics.entities.stock.GoodsCapacity;
import com.ysy.logistics.entities.supplier.SupGoods;
import lombok.Data;



/**
 * @ClassDescription: 入库商品
 * @Author:姚斯羽
 * @Create:2025/4/2 15:02
 **/
@Data
public class PutSupGoodsDto extends SupGoods {



    //是否存在商品规格
    private boolean existGoodsCapacity;
    private GoodsCapacity goodsCapacity;
    private Long total;
    private Long goodsNum;


    public static   PutSupGoodsDto convert(SupGoods supGoods){
        PutSupGoodsDto putSupGoodsDto = new PutSupGoodsDto();
        putSupGoodsDto.setId(supGoods.getId());
        putSupGoodsDto.setName(supGoods.getName());
        putSupGoodsDto.setPrice(supGoods.getPrice());
        putSupGoodsDto.setType(supGoods.getType());
        putSupGoodsDto.setSpecification(supGoods.getSpecification());
        putSupGoodsDto.setPriceUnit(supGoods.getPriceUnit());
        return putSupGoodsDto;
    }
}
